package com.itheima.design.mode.singleton;

/**
 * 最常用的單例模式
 */
public class Singleton {

    private static class SingletonHolder{
        private static Singleton instance = new Singleton();
    }

    public Singleton() {
    }

    public static Singleton getInstance(){
        return SingletonHolder.instance;
    }
}
